package com.xuecheng.system.controller;

import com.xuecheng.api.system.CourseCategoryApi;
import com.xuecheng.api.system.model.dto.CourseCategoryDTO;
import com.xuecheng.api.system.model.dto.CourseCategoryOperDTO;
import com.xuecheng.common.domain.response.RestResponse;
import com.xuecheng.system.entity.CourseCategory;
import com.xuecheng.system.service.CourseCategoryService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 课程分类 前端控制器
 * </p>
 *
 * @author itcast
 */
@Slf4j
@RestController
public class CourseCategoryController implements CourseCategoryApi {

    @Autowired
    private CourseCategoryService  courseCategoryService;

    @GetMapping("course-category/tree-nodes")
    public List<CourseCategoryDTO> queryTreeNodes() {
        return courseCategoryService.queryTreeNodes();
    }

    @ApiOperation("查询父课程分类列表")
    @GetMapping("course-category/queryParentLists")
    public RestResponse< List<CourseCategory>> queryParentLists() {
        return null;
    }

    @ApiOperation("编辑课程分类")
    @PutMapping("course-category/edit")
    public RestResponse edit(@RequestBody CourseCategoryDTO categoryDTO) {
        return null;
    }

    @ApiOperation("课程分类上下移动")
    @PutMapping("course-category/moveTo")
    public RestResponse moveTo(@RequestBody CourseCategoryOperDTO categoryOperDTO) {
        return null;
    }


    @ApiOperation("添加课程分类")
    @PostMapping("course-category/add")
    public RestResponse add(@RequestBody CourseCategoryDTO categoryDTO) {
        return null;
    }

    @ApiOperation("删除课程分类")
    @DeleteMapping("course-category/delete/{id}")
    public RestResponse delete(@PathVariable String id) {
        return null;
    }

    @GetMapping("l/course-category/{id}")
    public RestResponse<CourseCategoryDTO> getCourseCategoryById4s(@PathVariable String id) {
        return null;
    }
}
